import request from '@/utils/request'

// 新增
export function eventAdd(data = {}) {
  return request({
    url: '/jiaxing-saas/event/create',
    method: 'post',
    data: data
  })
}
// 删除
export function eventDel(data = {}) {
  return request({
    url: '/jiaxing-saas/event/delete',
    method: 'get',
    params: data
  })
}
// 修改
export function eventEdit(data = {}) {
  return request({
    url: '/jiaxing-saas/event/update',
    method: 'post',
    data: data
  })
}
// 详情
export function eventDtl(data = {}) {
  return request({
    url: '/jiaxing-saas/event/detail',
    method: 'get',
    params: data
  })
}
// 列表
export function eventList(data = {}) {
  return request({
    url: '/jiaxing-saas/event/list',
    method: 'get',
    params: data
  })
}

// 转派
export function eventTransfer(data = {}) {
  return request({
    url: '/jiaxing-saas/event/transfer',
    method: 'post',
    data: data
  })
}

// 事件违规类型
export function eventViolation(data = {}) {
  return request({
    url: '/jiaxing-saas/event/violation',
    method: 'get',
    params: data
  })
}

// 事件处置
export function eventHandle(data = {}) {
  return request({
    url: '/jiaxing-saas/event/handle',
    method: 'post',
    data: data
  })
}


// 获取问题类型
export function getQuestion(data = {}) {
  return request({
    url: '/jiaxing-saas/event/problem',
    method: 'get',
    params: data
  })
}

// 获取问题详细类型
export function getQuestionDtl(data = {}) {
  return request({
    url: '/jiaxing-saas/event/detailProblem',
    method: 'get',
    params: data
  })
}


// 获取事件类型
export function getProblemTree(data = {}) {
  return request({
    url: '/workbench/problem-type/tree',
    method: 'get',
    params: data
  })
}
